package com.bawei.park2301.fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.lifecycleScope
import com.bawei.libs_base.mvvm.BaseFragment
import com.bawei.libs_base.mvvm.BaseViewFragment
import com.bawei.park2301.R
import com.bawei.park2301.databinding.FragmentBlankBinding
import com.bawei.park2301.notice.NoticeAdapter
import com.bawei.park2301.notice.NoticeViewModel
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch

@AndroidEntryPoint
class BlankFragment : BaseFragment<FragmentBlankBinding,NoticeViewModel>() {
    val noticeAdapter by lazy {
        NoticeAdapter()
    }
    override fun initView() {
        binding.rvNotice.adapter=noticeAdapter


        lifecycleScope.launch {
            viewModel.getNoticeList().collect{
                noticeAdapter.submitData(it)
            }
        }
    }

    override fun initData() {

    }
}